class Student(object):
    count = 0  # 类属性，用于统计学生人数

    def __init__(self, name):
        self.name = name
        Student.count += 1  # 每创建一个实例，学生人数增加1

s = Student('John')
print(s.count)
m = Student('Mike')
print(m.count)